#pragma once

#include "TermList.hpp"

namespace terms {
	template <typename BaseTerm, typename Term=BaseTerm>
	class OperatorTerm
		: public TermList<BaseTerm, Term>
	{	
	public:
		using TermList<BaseTerm, Term>::TermList;

	public:
		virtual const char *get_operator_name() const = 0;
	
	public:
		virtual std::string
		to_string() const
		{
			std::string str = "(";
			str.append(get_operator_name());
			str.append(" ");
			str.append(terms::TermList<BaseTerm, Term>::to_string(" "));
			str.append(")");
			return str;
		}
	};
}
